package haizhi.fruitmall.util;

import haizhi.fruitmall.exception.ResultException;
import haizhi.fruitmall.pojo.view.ResultView;
import org.springframework.validation.BindingResult;

/**
 * Created by richa on 2017/8/22
 */
public class ResultUtil {

    public static ResultView getSuccess(){
        return new ResultView();
    }

    public static ResultView getSuccess(Object data){
        return new ResultView(data);
    }

    public static ResultView getFailure(ResultException resultException){
        return new ResultView(resultException);
    }
}
